import { ArrayGenerator } from "./arrayGenerator.js"
import { SortHelper } from "./sortHelper.js"

console.log("----------有序数组----------")
let sort = ArrayGenerator.generateSortedArray(10000)
let sort2 = sort.concat()
let sort3 = sort.concat()
SortHelper.sortTest("选择排序", sort)
SortHelper.sortTest("插入排序", sort2)
SortHelper.sortTest("归并排序", sort3)

console.log("----------无序数组----------")
let unsort = ArrayGenerator.generateRandomArray(10000)
let unsort2 = unsort.concat()
let unsort3 = unsort.concat()
SortHelper.sortTest("选择排序", unsort)
SortHelper.sortTest("插入排序", unsort2)
SortHelper.sortTest("归并排序", unsort3)

console.log("----------无序数组----------")
let unsort4 = ArrayGenerator.generateRandomArray(100000)
let unsort5 = unsort4.concat()
let unsort6 = unsort4.concat()
SortHelper.sortTest("选择排序", unsort4)
SortHelper.sortTest("插入排序", unsort5)
SortHelper.sortTest("归并排序", unsort6)

